# 转换为整数int
# 字符串str -> 整数int
# 纯数字的字符串
s = '2024'
print(s)
n = int(s)
print(type(s),type(n))

# 浮点数float -> 整数int
s1 = 2.23
print(int(s1))

# 布尔bool -< 整数int
s2,s3 = True,False
print(int(s2),int(s3))


# 转换为浮点数float
# str -> float
s = '324.6'
print(float(s))
# int -> float
n = 2024
print(float(n))
#bool ->float
print(float(s2),float(s3))


# 转换为布尔型bool
# str -> bool
s = 'sdw323'
print(bool(s))
s1 = ''
print(bool(s1))
# int ->bool
n=0
print(bool(n))
# float -> bool
f = 0.0
print(bool(f))

# 转换为字符串str
# int -> str
n = 5
print(type(str(n)))

# float -> str
f = 5.3
print(type(str(f)))

# bool -> str
a = True
print(type(str(a)))